#include <asm.h>
#include <regdef.h>
#include <new_inst_test.h>

#define instr bltzl
LEAF(my28_bltzl_test)
    .set noreorder
    addiu s0,s0,1;
    li    s2,0;
###test inst
    TEST_BRANCH_LIKE(bltzl,0xffff2223,0x1,concat(bltzl,dont_jump_1),concat(bltzl,jump_1));
    TEST_BRANCH_LIKE(bltzl,0xffff3eaa,0x5b8a,concat(bltzl,dont_jump_2),concat(bltzl,jump_2));
    TEST_BRANCH_LIKE(bltzl,0xfffe6fb8,0xed,concat(bltzl,dont_jump_3),concat(bltzl,jump_3));
    TEST_BRANCH_LIKE(bltzl,0xffb97082,0x5c0,concat(bltzl,dont_jump_4),concat(bltzl,jump_4));
    TEST_BRANCH_LIKE(bltzl,0xfff986ef,0x108f,concat(bltzl,dont_jump_5),concat(bltzl,jump_5));
    TEST_BRANCH_LIKE(bltzl,0xffff13ee,0x6,concat(bltzl,dont_jump_6),concat(bltzl,jump_6));
    TEST_BRANCH_LIKE(bltzl,0xfdefab7d,0x0,concat(bltzl,dont_jump_7),concat(bltzl,jump_7));
    TEST_BRANCH_LIKE(bltzl,0xfff3c157,0xd61,concat(bltzl,dont_jump_8),concat(bltzl,jump_8));
    TEST_BRANCH_LIKE(bltzl,0xfff829f9,0x20aa63a,concat(bltzl,dont_jump_9),concat(bltzl,jump_9));
    TEST_BRANCH_LIKE(bltzl,0xffb970f1,0x15a,concat(bltzl,dont_jump_10),concat(bltzl,jump_10));
    TEST_BRANCH_LIKE(bltzl,0xffca64c9,0x237f,concat(bltzl,dont_jump_11),concat(bltzl,jump_11));
    TEST_BRANCH_LIKE(bltzl,0xfdef8279,0xbdb8,concat(bltzl,dont_jump_12),concat(bltzl,jump_12));
###detect exception
    bne s2,zero,inst_error
    nop
###score ++
    addiu s3, s3, 1
###output (s0<<24)|s3
inst_error:  
    sll t1, s0, 24
    or t0, t1, s3 
    sw t0, 0(s1)
    jr ra
    nop
END(my28_bltzl_test)
